<div class="twelve columns">
    <div class="box">
        <div class="title"><img src="<?=url()?>templates/images/ico_opbook.png" width="42">Tin đã đăng</div>
        <div class="">
        	<ul class="hd">
            	<li class="no">Stt</li>
                <li class="subject">Tiêu đề</li>
                <li class="town">Cập nhật</li>
                <li class="date">Chức năng</li>
            </ul>
        	<?
				$i = 0;
				foreach ($list as $rs) :
					$i = $i + 1 ;
			?>
            <ul class="bd">
            	<li class="no"><?=$i?></li>
                <li class="subject"><a href="<?=site()?>rao-vat/chi-tiet/<?=$rs->raovat_id?>/<?=kodau($rs->lb_subject).ext?>"><?=str_limit($rs->lb_subject, 90)?></a></li>
                <li class="town" id="town_<?=$rs->raovat_id?>"><?=shortdate($rs->dt_modify)?></li>
                <li class="date">
                <a href="javascript:renew(<?=$rs->raovat_id?>);" title="renew"><img src="<?=url()?>templates/images/renew.png"></a>&nbsp;
                <a href="<?=site()?>user/editraovat/<?=$rs->raovat_id?>/<?=kodau($rs->lb_subject)?>.raovat" title="Cập nhật"><img src="<?=url()?>templates/images/button_edit.png"></a>&nbsp;
                <a href="<?=site()?>user/delete/<?=$rs->raovat_id?>/<?=kodau($rs->lb_subject)?>.raovat" title="Xóa tin"><img src="<?=url()?>templates/images/button_drop.png"></a></li>
            </ul>
            <?
				endforeach ;
			?>
            <div class="paging"><?=$pagination?></div>
        </div>
    </div>
</div>
<script language="javascript">
function renew(id)
{
	$.post(site+'user/renew/'+id,{},function(res){
		if(res.code==1)
			$('#town_'+ id).html(res.date);
	},'json');
}
</script>